import requests


def get_header():
    url = "http://ihrm2-test.itheima.net/api/sys/login"
    data = {"mobile": "13800000002", "password": "123456"}
    req = requests.post(url=url, json=data)
    token = req.json().get("data")
    header = {"Content-Type": "application/json",
              "Authorization": "Bearer " + token}
    return header


if __name__ == '__main__':
    print(get_header())
